const Utils = require("../utils");
const { SERVER_ERROR_CODE } = require("../config/admin/state_code");
module.exports = options =>{
  return async function authIsSuper(ctx, next) {
    let { is_super } = ctx.session;
    if(is_super === 0){
      return ctx.body =  Utils.createServerMsg("无访问权限",SERVER_ERROR_CODE,"")
    }
    await next();
  }
};
